package com.mode.proxy.pattern;

import java.lang.reflect.Proxy;

/**
 * @Description:
 * @Author: zyf
 * @Time: 2020/9/27 15:16
 */
public class ReflectTestMain {


    public static void main(String[] args) {
        Airplane airplane = new Airplane();
        ReflectProxy reflectProxy = new ReflectProxy(airplane);
        IVehicle vehicle = (IVehicle)Proxy.newProxyInstance(airplane.getClass().getClassLoader(),airplane.getClass().getInterfaces(),reflectProxy);
        vehicle.go();

    }
}
